<?php

use yii\helpers\Html;
use common\components\extenders\MenuManage;
use common\components\helpers\Fun;

use common\components\widgets\Datetimepicker;

Datetimepicker::widget(['flag'=>'timepicker','format'=>'Y-m-d']);

?>

<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <!--/*添加按钮*/-->
    <!--<?//= $this->renderFile('@app/views/layouts/toolbar.php'); ?>-->
    <!--/*搜索*/-->
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
        <?= Html::beginForm(Fun::url(['renewalrate/view','id'=>\Yii::$app->request->get('id')]), 'get', ['enctype' => 'multipart/form-data']) ?>
        <label>日期</label>
        <?=Html::textInput('satrtdate',\Yii::$app->request->get('satrtdate'),['class'=>'timepicker yx-width150 zx-lh24 yx-ml6'])?>
        <span class="yx-short-line">-</span>
        <?=Html::textInput('enddate',\Yii::$app->request->get('enddate'),['class'=>'timepicker yx-width150 zx-lh24 yx-ml6'])?>
        <?=Html::submitButton('搜索',['id'=>'search-handle','class'=>"yx-searchs yx-radius2"]); ?>
        <?php Html::endForm() ?>
    </div>
    <!--/*列表*/-->
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check"  data-tablesaw-mode="swipe" data-tablesaw-minimap >
            <thead>
            <tr class="yx-bgd2f6ec">
                <th><?=\Yii::t('zhtfrontend','老师');?></th>
                <th><?=\Yii::t('zhtfrontend','入班人数');?></th>
                <th><?=\Yii::t('zhtfrontend','预约人数');?></th>
                <th><?=\Yii::t('zhtfrontend','续课人数');?></th>
                <th><?=\Yii::t('zhtfrontend','续课率');?></th>
                <th><?=\Yii::t('zhtfrontend','退课人数');?></th>
                <th><?=\Yii::t('zhtfrontend','操作');?></th>
            </tr>
            </thead>
                <?php foreach($data as $item):?>
                    <tr data-id="<?=$item['id']?>">
                        <td><?=$item['name']?></td>
                        <td><?=$item['count']?></td>
                        <td><?=$item['appointmentCount']?></td>
                        <td><?=$item['renewCount']?></td>
                        <td><?=$item['renewalrate']?></td>
                        <td><?=$item['retreatcount']?></td>
                        <td><?=(new MenuManage(MenuManage::TOP_MENU))->detailsMenu('renewalrate','classmanage',true,['class' => 'btn yx-radius2 yx-d-card yx-bg65d1d4','data' => ['id'=>$item['id'],'name'=>'查看']])?></td>
                    </tr>
                <?php endforeach?>
        </table>
    </div>
</div>










